﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:c="clr-namespace:Tum.PDE.ToolFramework.Plugins.BreadcrumbNavigation"
                    xmlns:odc="clr-namespace:Odyssey.Controls;assembly=Odyssey">

    <HierarchicalDataTemplate ItemsSource="{Binding Path=Children}" x:Key="BreadCrumbItemTm">
        <TextBlock x:Name="textBlockName" Text="{Binding Path=DomainElementFullName}"/>
    </HierarchicalDataTemplate>

    <DataTemplate x:Key="BreadCrumbItemTmDD">
        <TextBlock x:Name="textBlockName" Text="{Binding Path=DomainElementFullName}"/>
    </DataTemplate>    

    <DataTemplate DataType="{x:Type c:BreadcrumbNavigationViewModel}">
        <DockPanel Margin="5">
            <odc:BreadcrumbBar DockPanel.Dock="Top" 
                           BreadcrumbItemTemplate="{StaticResource BreadCrumbItemTm}"
                           DropDownItemTemplate="{StaticResource BreadCrumbItemTmDD}"
                           Root="{Binding Path=RootViewModels, Mode=OneWay}"
                           TraceBinding="{Binding Path=Id}" IsEditable="False"
                           Path="{Binding Path=SelectedPath, Mode=TwoWay}">
                <odc:BreadcrumbBar.Resources>
                    <Style TargetType="{x:Type odc:RibbonMenuItem}">
                        <Setter Property="Header" Value="{Binding Path=DomainElementFullName}"/>
                    </Style>
                </odc:BreadcrumbBar.Resources>
            </odc:BreadcrumbBar>
        </DockPanel>
    </DataTemplate>
</ResourceDictionary>